package protobuf {
	import com.netease.protobuf.*;
	use namespace com.netease.protobuf.used_by_generated_code;
	import com.netease.protobuf.fieldDescriptors.*;
	import flash.utils.Endian;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;
	import flash.utils.IExternalizable;
	import flash.errors.IOError;
	import protobuf.MSPKG_WIN_TILES_INFO;
	import protobuf.MSPKG_LOSE_TILES_INFO;
	// @@protoc_insertion_point(imports)

	// @@protoc_insertion_point(class_metadata)
	public dynamic final class MSPKG_SHOW_TILES_NTF extends com.netease.protobuf.Message {
		/**
		 *  @private
		 */
		public static const TABLE_ID:FieldDescriptor$TYPE_UINT64 = new FieldDescriptor$TYPE_UINT64("protobuf.MSPKG_SHOW_TILES_NTF.table_id", "tableId", (1 << 3) | com.netease.protobuf.WireType.VARINT);

		public var tableId:UInt64;

		/**
		 *  @private
		 */
		public static const WIN_INFOS:RepeatedFieldDescriptor$TYPE_MESSAGE = new RepeatedFieldDescriptor$TYPE_MESSAGE("protobuf.MSPKG_SHOW_TILES_NTF.win_infos", "winInfos", (2 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED, protobuf.MSPKG_WIN_TILES_INFO);

		[ArrayElementType("protobuf.MSPKG_WIN_TILES_INFO")]
		public var winInfos:Array = [];

		/**
		 *  @private
		 */
		public static const LOSE_INFOS:RepeatedFieldDescriptor$TYPE_MESSAGE = new RepeatedFieldDescriptor$TYPE_MESSAGE("protobuf.MSPKG_SHOW_TILES_NTF.lose_infos", "loseInfos", (3 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED, protobuf.MSPKG_LOSE_TILES_INFO);

		[ArrayElementType("protobuf.MSPKG_LOSE_TILES_INFO")]
		public var loseInfos:Array = [];

		/**
		 *  @private
		 */
		public static const IS_DRAW:FieldDescriptor$TYPE_BOOL = new FieldDescriptor$TYPE_BOOL("protobuf.MSPKG_SHOW_TILES_NTF.is_draw", "isDraw", (4 << 3) | com.netease.protobuf.WireType.VARINT);

		private var is_draw$field:Boolean;

		private var hasField$0:uint = 0;

		public function clearIsDraw():void {
			hasField$0 &= 0xfffffffe;
			is_draw$field = new Boolean();
		}

		public function get hasIsDraw():Boolean {
			return (hasField$0 & 0x1) != 0;
		}

		public function set isDraw(value:Boolean):void {
			hasField$0 |= 0x1;
			is_draw$field = value;
		}

		public function get isDraw():Boolean {
			if(!hasIsDraw) {
				return false;
			}
			return is_draw$field;
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function writeToBuffer(output:com.netease.protobuf.WritingBuffer):void {
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 1);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT64(output, this.tableId);
			for (var winInfos$index:uint = 0; winInfos$index < this.winInfos.length; ++winInfos$index) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 2);
				com.netease.protobuf.WriteUtils.write$TYPE_MESSAGE(output, this.winInfos[winInfos$index]);
			}
			for (var loseInfos$index:uint = 0; loseInfos$index < this.loseInfos.length; ++loseInfos$index) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 3);
				com.netease.protobuf.WriteUtils.write$TYPE_MESSAGE(output, this.loseInfos[loseInfos$index]);
			}
			if (hasIsDraw) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 4);
				com.netease.protobuf.WriteUtils.write$TYPE_BOOL(output, is_draw$field);
			}
			for (var fieldKey:* in this) {
				super.writeUnknown(output, fieldKey);
			}
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function readFromSlice(input:flash.utils.IDataInput, bytesAfterSlice:uint):void {
			var table_id$count:uint = 0;
			var is_draw$count:uint = 0;
			while (input.bytesAvailable > bytesAfterSlice) {
				var tag:uint = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
				switch (tag >> 3) {
				case 1:
					if (table_id$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_SHOW_TILES_NTF.tableId cannot be set twice.');
					}
					++table_id$count;
					this.tableId = com.netease.protobuf.ReadUtils.read$TYPE_UINT64(input);
					break;
				case 2:
					this.winInfos.push(com.netease.protobuf.ReadUtils.read$TYPE_MESSAGE(input, new protobuf.MSPKG_WIN_TILES_INFO()));
					break;
				case 3:
					this.loseInfos.push(com.netease.protobuf.ReadUtils.read$TYPE_MESSAGE(input, new protobuf.MSPKG_LOSE_TILES_INFO()));
					break;
				case 4:
					if (is_draw$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_SHOW_TILES_NTF.isDraw cannot be set twice.');
					}
					++is_draw$count;
					this.isDraw = com.netease.protobuf.ReadUtils.read$TYPE_BOOL(input);
					break;
				default:
					super.readUnknown(input, tag);
					break;
				}
			}
		}

	}
}
